package com.spzx.cart.api;
import com.spzx.cart.api.domain.CartItem;
import com.spzx.cart.api.factory.RemoteCartFallbackFactory;
import com.spzx.common.core.constant.ServiceNameConstants;
import com.spzx.common.core.domain.R;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

@FeignClient(contextId = "remoteCartService"
        , value = ServiceNameConstants.CART_SERVICE //注册中心的服务名
        , fallbackFactory = RemoteCartFallbackFactory.class //降级工厂
)
public interface RemoteCartService {

    @Operation(summary = "内部调用接口：查询结算页需要的购物项列表")
    @GetMapping("getCheckedCartItems")
    public R<List<CartItem>> getCheckedCartItems();


    @Operation(summary = "内部调用接口：提交订单 删除用户购物车中选中的购物项")

    @GetMapping("delCheckedCartItems")
    public R<Boolean> delCheckedCartItems();


}
